home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 21
/
CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso
/
CUCD
/
Magazine
/
C_Tutorial
/
Part-9
/
wb1
/
visual.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-10-27
|
567b
|
37 lines
#include "visual.h"
#include "screen.h"
#include<utility/tagitem.h>
#include<stdio.h>
#include<clib/gadtools_protos.h>
/* Global record of the screen's visual information */
static APTR vinfo = NULL;
int createVisual()
{
/* Get the visual info so GadTools can render the gadgets nicely */
if(vinfo = GetVisualInfo(getScreen(), TAG_DONE))
/* Succeeded */
return TRUE;
else
printf("Error: could not get visual info\n");
return FALSE;
}
void freeVisual()
{
if(vinfo)
{
FreeVisualInfo(vinfo);
vinfo = NULL;
}
}
APTR getVisual()
{
return vinfo;
}